package com.cyx.gametool.tool;

import com.cyx.gametool.excel.ExcelColumnTitle;
import com.cyx.gametool.excel.ExcelTableData;

import java.util.List;

public class ExcelExportTool {

    /**
     * 检查配置信息是否正确
     *
     * @param excelTableData excel表格数据
     */
    public static void checkConfig(ExcelTableData excelTableData) {
        if (excelTableData == null) {
            return;
        }
        if (excelTableData.getSourceFile() == null) {
            return;
        }
        if (excelTableData.getExcelColumnTitles() == null) {
            return;
        }
        List<ExcelColumnTitle> excelColumnTitles = excelTableData.getExcelColumnTitles();
        for (ExcelColumnTitle excelColumnTitle : excelColumnTitles) {
            if (excelColumnTitle.getFieldName() == null) {
                return;
            }
            if (excelColumnTitle.getFieldType() == null) {
                return;
            }
        }

    }

    public static void excelToMysqlSql(ExcelTableData excelTableData) {
    }

}
